package com.example.demo.config;

import lombok.extern.slf4j.Slf4j;
import org.apache.catalina.filters.RemoteIpFilter;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import java.io.IOException;

/**
 * Created by void on 2020/4/12.
 *
 */
@Slf4j
public class MyRemoteIpFilter extends RemoteIpFilter {

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
//        HttpUtil.printAllHeader((HttpServletRequest) request);
        super.doFilter(request, response, chain);
    }
}
